class CreateSalesFirmDetails < ActiveRecord::Migration[5.1]
  def change
    create_table :sales_firm_details do |t|
      t.string :legal_person, comment: '法人'
      t.float :register_money, comment: '注册资金'
      t.integer :register_money_type, comment: '美元/人民币'
      t.string :business_type, comment: '行业'
      t.datetime :register_time, comment: '注册时间'
      t.string :business_area, comment: '经营范围',limit: 2000
      t.string :notes, comment: '备注', limit: 2000
      t.integer :firm_id, comment: '对应公司'

      t.timestamps
    end
    add_index :sales_firm_details, :firm_id
  end
end
